package com.ios.service;

import com.ios.model.entity.Reservation;
import java.util.List;

/**
 * 预约记录服务接口
 */
public interface ReservationService {
    /**
     * 查询预约
     */
    Reservation selectReservationById(Long id);

    /**
     * 查询预约列表
     */
    List<Reservation> selectReservationList(Reservation reservation);

    /**
     * 新增预约
     */
    int insertReservation(Reservation reservation);

    /**
     * 修改预约
     */
    int updateReservation(Reservation reservation);

    /**
     * 删除预约
     */
    int deleteReservationById(Long id);

    /**
     * 批量删除预约
     */
    int deleteReservationByIds(Long[] ids);

    /**
     * 用户取消预约
     */
    int cancelReservation(Long id, Long userId, String reason);

    /**
     * 管理员审核预约
     */
    int reviewReservation(Long id, Long reviewerId, boolean approved, String reason);

    /**
     * 用户签到
     */
    int checkIn(Long id, Long userId);

    /**
     * 检查时间段冲突
     */
    boolean hasTimeSlotConflict(Reservation reservation);

    List<Reservation> selectReservationsByUserId(Long userId);
}